package com.arellomobile.android.push.utils;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import com.arellomobile.android.push.preference.SoundType;
import com.arellomobile.android.push.preference.VibrateType;

public class PreferenceUtils
{
  private static final String LAST_REGISTRATION = "last_registration_change";
  private static final String PREFERENCE = "com.google.android.c2dm";

  public static String getApplicationId(Context paramContext)
  {
    return paramContext.getSharedPreferences("com.google.android.c2dm", 0).getString("dm_pwapp", "");
  }

  public static boolean getEnableLED(Context paramContext)
  {
    return paramContext.getSharedPreferences("com.google.android.c2dm", 0).getBoolean("dm_ledon", false);
  }

  public static long getLastRegistration(Context paramContext)
  {
    return paramContext.getSharedPreferences("com.google.android.c2dm", 0).getLong("last_registration_change", 0L);
  }

  public static boolean getLightScreenOnNotification(Context paramContext)
  {
    return paramContext.getSharedPreferences("com.google.android.c2dm", 0).getBoolean("dm_lightson", false);
  }

  public static int getMessageId(Context paramContext)
  {
    return paramContext.getSharedPreferences("com.google.android.c2dm", 0).getInt("dm_messageid", 1001);
  }

  public static boolean getMultiMode(Context paramContext)
  {
    return paramContext.getSharedPreferences("com.google.android.c2dm", 0).getBoolean("dm_multimode", false);
  }

  public static String getSenderId(Context paramContext)
  {
    return paramContext.getSharedPreferences("com.google.android.c2dm", 0).getString("dm_sender_id", "");
  }

  public static SoundType getSoundType(Context paramContext)
  {
    return SoundType.fromInt(Integer.valueOf(paramContext.getSharedPreferences("com.google.android.c2dm", 0).getInt("dm_soundtype", 0)).intValue());
  }

  public static VibrateType getVibrateType(Context paramContext)
  {
    return VibrateType.fromInt(Integer.valueOf(paramContext.getSharedPreferences("com.google.android.c2dm", 0).getInt("dm_vibratetype", 0)).intValue());
  }

  public static void resetLastRegistration(Context paramContext)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.remove("last_registration_change");
    localEditor.commit();
  }

  public static void setApplicationId(Context paramContext, String paramString)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putString("dm_pwapp", paramString);
    localEditor.commit();
  }

  public static void setEnableLED(Context paramContext, boolean paramBoolean)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putBoolean("dm_ledon", paramBoolean);
    localEditor.commit();
  }

  public static void setLastRegistration(Context paramContext, long paramLong)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putLong("last_registration_change", paramLong);
    localEditor.commit();
  }

  public static void setLightScreenOnNotification(Context paramContext, boolean paramBoolean)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putBoolean("dm_lightson", paramBoolean);
    localEditor.commit();
  }

  public static void setMessageId(Context paramContext, int paramInt)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putInt("dm_messageid", paramInt);
    localEditor.commit();
  }

  public static void setMultiMode(Context paramContext, boolean paramBoolean)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putBoolean("dm_multimode", paramBoolean);
    localEditor.commit();
  }

  public static void setSenderId(Context paramContext, String paramString)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putString("dm_sender_id", paramString);
    localEditor.commit();
  }

  public static void setSoundType(Context paramContext, SoundType paramSoundType)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putInt("dm_soundtype", paramSoundType.getValue());
    localEditor.commit();
  }

  public static void setVibrateType(Context paramContext, VibrateType paramVibrateType)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    localEditor.putInt("dm_vibratetype", paramVibrateType.getValue());
    localEditor.commit();
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.arellomobile.android.push.utils.PreferenceUtils
 * JD-Core Version:    0.6.2
 */